renameremote: Support --json and --json-error-messages
authorJoey Hess <joeyh@joeyh.name>
Mon, 8 May 2023 20:25:40 +0000 (16:25 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 8 May 2023 20:25:40 +0000 (16:25 -0400)
Seems unlikely to be useful, but it works so

Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
CHANGELOG
Command/RenameRemote.hs
doc/todo/--json_for_unannex__and_ideally_any_other_command_.mdwn

index 2d691b120926f6fd3e83938de53635cc1ae61ad6..ed7eae0d339ff4c68ee9f43e5d8c0a01c08c54fc 100644 (file)
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -39,8 +39,8 @@ git-annex (10.20230408) UNRELEASED; urgency=medium
     broken.
   * Support --json and --json-error-messages in more commands
     (addunused, dead, describe, dropunused, expire, fix, init, log, migrate,
-    reinit, reinject, rekey, rmurl, semitrust, setpresentkey, trust, unannex,
-    undo, untrust, unused)
+    reinit, reinject, rekey, renameremote, rmurl, semitrust, setpresentkey,
+    trust, unannex, undo, untrust, unused)
   * log: When --raw-date is used, display only seconds from the epoch, as
     documented, omitting a trailing "s" that was included in the output
     before.
index 819fdc5b8269d35940ea32967fe36e888bbd68ae..989cb3df9e1e3d32f708321083aa2164c2cbaa8e 100644 (file)
@@ -18,10 +18,11 @@ import Types.ProposedAccepted
 import qualified Data.Map as M
 
 cmd :: Command
-cmd = command "renameremote" SectionSetup
-       "changes name of special remote"
-       (paramPair paramName paramName)
-       (withParams seek)
+cmd = withAnnexOptions [jsonOptions] $
+       command "renameremote" SectionSetup
+               "changes name of special remote"
+               (paramPair paramName paramName)
+               (withParams seek)
 
 seek :: CmdParams -> CommandSeek
 seek = withWords (commandAction . start)
index cda2671f9d052b3f270fe3dfab35850eae6025e8..5ae0d171e3c1c41f163ee20c51c8ddb0c56c9f09 100644 (file)
@@ -35,6 +35,7 @@ These commands have been updated to support --json:
 * git-annex-init
 * git-annex-reinit
 * git-annex-reinject
+* git-annex-renameremote
 
 Provisional list of commands that don't support --json and maybe should:
 
@@ -44,7 +45,6 @@ Provisional list of commands that don't support --json and maybe should:
 * git-annex-enableremote
 * git-annex-initremote
 * git-annex-merge
-* git-annex-renameremote
 * git-annex-upgrade
 
 These commands could support json, but I punted: